import {FC} from "react";
import {NavigateFunction, NavigateOptions, useNavigate} from "react-router-dom";

/**
 * @Description: 自定义导航组件
 * 挂载在全局，供全局使用
 * @author zhaojiuyi
 * @date 2023/4/16
 */
let navigationInstance: NavigateFunction
export const MyNavigation: FC = () => {
    navigationInstance = useNavigate()
    return (
        <></>
    )
}
export const navigation = (path: string, option?: NavigateOptions) => {
    navigationInstance(path, option)
}
